home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
114_01
/
ed6.ccc
< prev
next >
Wrap
Text File
|
1987-07-13
|
2KB
|
129 lines
/*
Screen editor: terminal output module
Source: ed6.ccc
This file was created by the configuration program:
Version 2: September 6, 1981.
*/
#include ed.h
#include bdscio.h
#include ed1.ccc
#include edext.cc
/*
Define the current coordinates of the cursor.
*/
/*
Return the current coordinates of the cursor.
*/
outgetx()
{
return(outx);
}
outgety()
{
return(outy);
}
/*
Output one printable character to the screen.
*/
outchar(c) char c;
{
syscout(c);
outx++;
return(c);
}
/*
Position cursor to position x,y on screen.
0,0 is the top left corner.
*/
outxy(x,y) int x,y;
{
outx=x;
outy=y;
syscout(138);
syscout(y);
syscout(154);
syscout(x);
}
/*
Erase the entire screen.
Make sure the rightmost column is erased.
*/
outclr()
{
syscout(12);
outxy(0,0);
}
/*
Delete the line on which the cursor rests.
Leave the cursor at the left margin.
*/
outdelln()
{
outxy(0,outy);
outdeol();
}
/*
Delete to end of line.
Assume the last column is blank.
*/
outdeol()
{
int k;
k=outx;
while (k++<SCRNW1) {
syscout(' ');
}
outxy(outx,outy);
}
/*
Return yes if terminal has indicated hardware scroll.
*/
outhasup()
{
return(YES);
}
outhasdn()
{
return(NO);
}
/*
Scroll the screen up.
Assume the cursor is on the bottom line.
*/
outsup()
{
/* auto scroll */
outxy(0,SCRNL1);
syscout(10);
}
/*
Scroll screen down.
Assume the cursor is on the top line.
*/
outsdn()
{
}